﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Principal;

namespace Chapter12_Lesson01
{
    class Program
    {
        static void Main(string[] args)
        {
            WindowsIdentity wi = WindowsIdentity.GetCurrent();

            WindowsPrincipal wp = new WindowsPrincipal(wi);

            bool b;

            b = wp.IsInRole(WindowsBuiltInRole.Administrator);

        }
    }
}
